import './assets/main.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import {createApp} from 'vue'
import Index from './Index.vue'
import Insert from './Insert.vue'
import Root from './Root.vue'
import Put from './put.vue'
import {createRouter, createWebHashHistory} from "vue-router"
import axios from 'axios'
import $ from 'jquery'
import store from "@/store.js";

window.$ = window.jQuery = $;

const routes = [							// 配置路由
    {path: '/', component: Index},
    {path: '/Insert', component: Insert},
    {name: "change", path: '/:id/:type/question', component: Put},]

const router = createRouter({
    routes, history: createWebHashHistory(),
})					//创建路由实例,hash模式


const app = createApp(Root)
axios.defaults.baseURL = 'http://127.0.0.1:6999';
app.config.globalProperties.$axios = axios;
app.config.globalProperties.$s_host = "http://127.0.0.1:6999";
app.use(router)
app.use(ElementPlus)
app.use(store);
app.mount('#app')